<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位-绝对定位</title>
    <style>
        .f{
            width: 300px;
            height: 300px;
            background-color: lightblue;
            /* 绝对定位  position: absolute + left/right + top/bottom */
            /* 1.脱离原本的文档流  2.移动，失去原本的位置，子元素是相对于父元素发生移动的 */
            position: absolute;
            top: 0;
            left: 0;
            transition: all 1s linear 0s;
        }
        .s{
            width: 100px;
            height: 100px;
            background-color: lightcoral;
            /* 绝对定位 */
            position: absolute;
            top: 0;
            left: 0;
            transition: all 1s linear 0s;
        }

        .f:hover{
            left: 100px;
            top: 100px;
        }

        .other{
            width: 200px;
            height: 200px;
            background-color: green;
        }
    </style>
</head>
<body>
    <div class="f">
        <div class="s"></div>
    </div>
    <div class="other">参照物，不动</div>
</body>
</html>